import { StatusBar } from 'expo-status-bar';
import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, View, Button, DeviceEventEmitter } from 'react-native';
import { createAppContainer } from 'react-navigation';
import Route from './src/root.route';

/* Support Expo */
import { setExpoStatusBarHeight } from "react-navigation-collapsible";
import Constants from "expo-constants";

setExpoStatusBarHeight(Constants.statusBarHeight);



// const TABS = {
//   home: {
//     screen: HomeStack,
//     navigationOptions: {
//       // tabBarLabel: 'Page1',
//     }
//   },
//   parent: {
//     screen: Parent,
//     navigationOptions: {
//       // tabBarLabel: 'Page2',
//     }
//   },
//   child: {
//     screen: Child,
//     navigationOptions: {
//       // tabBarLabel: 'Page3',
//     }
//   },
// }

// const TabNav = createBottomTabNavigator(
//   {
//     home: {
//       screen: HomeStack,
//       navigationOptions: {
//         // tabBarLabel: 'Page1',
//       }
//     },
//     parent: {
//       screen: Parent,
//       navigationOptions: {
//         // tabBarLabel: 'Page2',
//       }
//     },
//     child: {
//       screen: Child,
//       navigationOptions: {
//         // tabBarLabel: 'Page3',
//       }
//     },
//   },
//   {
//     tabBarOptions: {
//       activeTintColor: Platform.OS === 'ios' ? '#e91e63' : '#fff',
//     }
//   }
// )

// class TabBarComponent extends React.Component {
//   render() {
//     <View>
//       <Text>TabBarComponent</Text>
//     </View>
//   }
// }


// tabBar.js



// Navigation 状态
// 传递给 navigator 的 props.navigation.state 的navigator状态具有如下的结构：
// {
//   index: 1, // identifies which route in the routes array is active
//   routes: [
//     {
//       // Each route needs a name, which routers will use to associate each route
//       // with a react component
//       routeName: 'MyRouteName',

//       // A unique id for this route, used to keep order in the routes array:
//       key: 'myroute-123',

//       // Routes can have any additional data. The included routers have `params`
//       ...customRouteData,
//     },
//     ...moreRoutes,
//   ]
// }


class MyClass {
  myNonStaticMethod () {
      console.log("I'm not static.", this.myStaticMethod )
      // MyClass.myStaticMethod()
  }

  static myStaticMethod () {
      console.log("hey, I'm static!")
  }
}


export default function App() {
  const AppContainer = createAppContainer(Route);

  // MyClass.myStaticMethod();
  const cls = new MyClass();
  cls.myNonStaticMethod();

  MyClass.myStaticMethod();

  return (
    <>
      <AppContainer>
      </AppContainer>
    </>
  );
}


